﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace WeChatSDK.WeChatDto.Conversation.ReplyMessage
{
    /// <summary>
    /// 回复图文消息
    /// </summary>
    [XmlRoot(Namespace ="",IsNullable =false,ElementName = "xml")]
    public class NewsReplyMessageDto: ReplyMessageDto
    {
        /// <summary>
        /// 图文消息个数，限制为8条以内
        /// </summary>
        [XmlElement("Title", DataType = "int")]
        public int ArticleCount { get; set; }
        /// <summary>
        /// 多条图文消息信息，默认第一个item为大图,注意，如果图文数超过8，则将会无响应
        /// </summary>
        [XmlArray("Articles")]
        public List<NewsItemArticlesDto> Articles { get; set; }      
    }
    [XmlType(TypeName = "item")]
    public class NewsItemArticlesDto {
        /// <summary>
        /// 图文消息标题
        /// </summary>
        [XmlElement("Title", DataType = "string")]
        public string Title { get; set; }
        /// <summary>
        /// 图文消息描述
        /// </summary>
        [XmlElement("Description", DataType = "string")]
        public string Description { get; set; }
        /// <summary>
        /// 图片链接，支持JPG、PNG格式，较好的效果为大图360*200，小图200*200
        /// </summary>
        [XmlElement("PicUrl", DataType = "string")]
        public string PicUrl { get; set; }
        /// <summary>
        /// 点击图文消息跳转链接
        /// </summary>
        [XmlElement("Url", DataType = "string")]
        public string Url { get; set; }
    }
}
